package com.woniuxy.intellihome.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.woniuxy.intellihome.entity.AdminPerm;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author jobob
 * @since 2021-08-11
 */
public interface AdminPermMapper extends BaseMapper<AdminPerm> {
    @Insert("insert into m_admin_perm (admin_id,perm_id) values(#{adminId},#{permId})")
    void addAdminPerm(@Param("adminId")int adminId, @Param("permId")int permId);

    @Delete("delete from m_admin_perm where admin_id = #{adminId}")
    void delByAdminId(int adminId);

}
